const Shell = imports.gi.Shell;
const GnomeSession = imports.misc.gnomeSession;
-const LoginManager = imports.misc.loginManager;
const Main = imports.ui.main;
const ShellMountOperation = imports.ui.shellMountOperation;
Lang.bind(this, this._InhibitorsChanged));
this._inhibited = false;
- this._loginManager = LoginManager.getLoginManager();
this._volumeMonitor = Gio.VolumeMonitor.get();
},
_onDriveConnected: function() {
// if we're not in the current ConsoleKit session,
// or screensaver is active, don't play sounds
- if (!this._loginManager.sessionActive)
+ if (!this._session.SessionIsActive)
return;
global.play_theme_sound(0, 'device-added-media',
_onDriveDisconnected: function() {
// if we're not in the current ConsoleKit session,
// or screensaver is active, don't play sounds
- if (!this._loginManager.sessionActive)
+ if (!this._session.SessionIsActive)
return;
global.play_theme_sound(0, 'device-removed-media',
_onDriveEjectButton: function(monitor, drive) {
// TODO: this code path is not tested, as the GVfs volume monitor
// doesn't emit this signal just yet.
- if (!this._loginManager.sessionActive)
+ if (!this._session.SessionIsActive)
return;
// we force stop/eject in this case, so we don't have to pass a
if (params.checkSession) {
// if we're not in the current ConsoleKit session,
// don't attempt automount
- if (!this._loginManager.sessionActive)
+ if (!this._session.SessionIsActive)
return;
}
const Gio = imports.gi.Gio;
const St = imports.gi.St;
-const LoginManager = imports.misc.loginManager;
const Main = imports.ui.main;
const MessageTray = imports.ui.messageTray;
const ShellMountOperation = imports.ui.shellMountOperation;
Name: 'AutorunManager',
_init: function() {
- this._loginManager = LoginManager.getLoginManager();
-
this._volumeMonitor = Gio.VolumeMonitor.get();
this._transDispatcher = new AutorunTransientDispatcher(this);
_onMountAdded: function(monitor, mount) {
// don't do anything if our session is not the currently
// active one
- if (!this._loginManager.sessionActive)
+ if (!this._session.SessionIsActive)
return;
this._processMount(mount, true);